<!DOCTYPE html>
<html>
<head>
    <title>考试表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <!--<i-col span="4">-->
                <!--<i-input v-model="q.name" @on-enter="query" placeholder="名称"/>-->
            <!--</i-col>-->
            <i-col span="4">
                <i-select v-model="q.studentId" filterable label-in-value placeholder="学生">
                    <i-option v-for="item in studentList" :value="item.userId"
                              :key="item.userId">{{item.username}}
                    </i-option>
                </i-select>
            </i-col>
            <i-button class="btn btn-primary" @click="query">查询</i-button>

            <i-button class="btn btn-success" @click="examDetail">考试详情</i-button>

            <div style="display: block;float: right">
			<#if shiro.hasPermission("lanling:exam:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("lanling:exam:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("lanling:exam:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
            </div>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <i-form ref="formValidate" :model="exam" :rules="ruleValidate" :label-width="80" class="form-horizontal">
                    <Form-item label="考试模板号码" prop="examTemId">
                        <i-input v-model="exam.examTemId" placeholder="考试模板id"/>
                    </Form-item>
                    <Form-item label="学员id" prop="studentId">
                        <i-input v-model="exam.studentId" placeholder="学员id"/>
                    </Form-item>
                    <Form-item label="序号" prop="sort">
                        <i-input v-model="exam.sort" placeholder="序号"/>
                    </Form-item>
                    <Form-item label="考试状态" prop="state">
                        <i-input v-model="exam.state" placeholder="1表示未开始，2表示考试中，3表示已交卷"/>
                    </Form-item>
                    <Form-item label="开始时间" prop="startTime">
                        <i-input v-model="exam.startTime" placeholder="考试开始时间"/>
                    </Form-item>
                    <Form-item label="结束时间" prop="endTime">
                        <i-input v-model="exam.endTime" placeholder="考试结束时间"/>
                    </Form-item>
                    <Form-item label="总用时间（单位：秒）" prop="totalTime">
                        <i-input v-model="exam.totalTime" placeholder="考试总用时间（单位：秒）"/>
                    </Form-item>
                    <Form-item label="分数" prop="totalScore">
                        <i-input v-model="exam.totalScore" placeholder="分数"/>
                    </Form-item>
                    <Form-item label="准确率" prop="correctrate">
                        <i-input v-model="exam.correctrate" placeholder="准确率"/>
                    </Form-item>
                    <Form-item label="创建人" prop="createUserId">
                        <i-input v-model="exam.createUserId" placeholder="创建人"/>
                    </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
            </Form-item>
        </i-form>
    </div>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/lanling/exam.js?_${.now?long}"></script>
</body>
</html>